import org.junit.Test
import umn.monopolybankservice.Game
import umn.monopolybankservice.Player
/**
 * Created by IntelliJ IDEA.
 * User: vikasgupta
 * Date: 3/9/12
 * Time: 8:20 PM
 * To change this template use File | Settings | File Templates.
 */
class GameControllerIntegrationTests {

    @Test
    void testCreateGame() {
        Game game = new Game()
        game.save(flush: true)
        Player bank = new Player()
        bank.setGame(game)
        bank.setName("Bank")
        bank.setWallet(100)
        bank.save(flush: true)
//        Player player = request['Player']
//        player.setGame(game)
//        player.save(flush: true)
//        print player.toString()
        bank.refresh()
        game.refresh()
        println "Bank: "
        print bank.toString()
        println "game: "
        print game.toString()
    }
}

